package com.zhdl.modules.prefiresys.service;

import com.project.common.service.BaseService;
import com.zhdl.modules.prefiresys.entity.DetectorHistoryData;
import com.zhdl.modules.prefiresys.web.request.DayHistoryListRequest;
import com.zhdl.modules.prefiresys.web.request.HistoryListRequest;
import com.zhdl.modules.prefiresys.web.response.HistoryListResp;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * 探测器开关量历史数据，用于画曲线
 */
public interface DetectorHistoryDataService extends BaseService<DetectorHistoryData, String> {

    DetectorHistoryData findNewRecords();

    /**
     * 分页显示探测器历史数据
     *
     * @return
     */
    Page<HistoryListResp> findAllRecord(HistoryListRequest request, Pageable pageable);

    /**
     * 通过防区id 查询实时浓度
     *
     * @param areaId 防区Id
     * @return 时间-浓度
     */
    List<DetectorHistoryData> findByAreaId(String areaId);

    List<DetectorHistoryData> findNullAndData(String areaId);

    List<HistoryListResp> findDayAllRecord(DayHistoryListRequest request);
}
